<?php

namespace app\admin\controller;


use app\common\model\Hetong as HetongModel;

class Hetong extends Base
{
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * 获取信息
     * @return void
     */
    public function list()
    {
        //查询条件
        $where['yiname'] = input('name');

        //获取分页列表
        $list = HetongModel::getAll($where,'id desc');

        if(!$list){
            $list=[];
        }else{
            foreach ($list as $k=>$v){
                $list[$k]['file']=config('web_domain') . substr($v['file'],1);
            }
        }


        //返回信息
        return returnJson(0, '', $list);
    }
}
